package com.woniuxy.controller;

import com.woniuxy.pojo.CfResult;
import com.woniuxy.pojo.CustLost;
import com.woniuxy.pojo.Customer;
import com.woniuxy.service.CfResultService;
import com.woniuxy.service.CustomerService;
import com.woniuxy.util.DataGridView;
import com.woniuxy.util.ResultDto;
import com.woniuxy.vo.CustLostVo;
import com.woniuxy.vo.CustomerVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class CfResultController {
    private Logger logger= LoggerFactory.getLogger(this.getClass());
   @Autowired
   private CfResultService cfResultService;

    //展示柱状图
    @RequestMapping( "/show")
    @ResponseBody
    public List<CfResult> show() {
        List<CfResult> cfResults = cfResultService.selectcountlevel();
        return cfResults;
    }

    @GetMapping(value = "show/countlevel")
    public DataGridView selectcuscountlevel(){
       return cfResultService.selectcuscountlevel();
    }





}
